<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: YanHilin
  Date: 2020/5/14
  Time: 18:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>管理企业用户</title>
    <base href="http://localhost:8080/onlineflower/">
    <%@include file="/page/comment/head.jsp"%>
    <link rel="stylesheet" type="text/css" href="static/css/form.css">
    <style type="text/css">
        table{
            margin: auto auto;
            width: 80% !important;
            text-align: center !important;
            vertical-align: middle !important;
        }
        th,tr,td{
            text-align: center !important;
            vertical-align: middle !important;
        }
        #pageN{
            margin-top: 10px;
            display:flex;
            align-items:center;
            justify-content:center;
        }

    </style>

</head>
<body>
<div>
    <%@include file="/page/admin/head_nav.jsp"%>
    <table class="table">
        <thead >
        <tr>
            <th>序号</th>
            <th>商铺编号</th>
            <th>商铺LOGO</th>
            <th>商铺名称</th>
            <th>法人姓名</th>
            <th>联系电话</th>
            <th>地址</th>
            <th>操作</th>
        </tr>
        </thead>
        <c:forEach items="${requestScope.page.item}" var="list" varStatus="s">
        <tbody>
            <tr>
                <th>${s.count}</th>
                <td>${list.enterpriseid}</td>
                <td><img src="static/picEnterprise/${list.head_sculpture}" width="100px" height="80px"> </td>
                <td>${list.enterprise_name}</td>
                <td>${list.relname}</td>
                <td>${list.telephone}</td>
                <td>${list.address}</td>
                <td><a class="deleteEnterprise" href="adminServlet?action=deleteEnterprise&enterpriseid=${list.enterpriseid}">删除</a></td>
            </tr>
        </tbody>
        </c:forEach>
    </table>
</div>
<%@include file="/page/comment/page_nav.jsp"%>
</body>
<script>
    $(function () {
        $("a.deleteEnterprise").click(function () {
            var enterpriseid=$(this).parent().parent().find("td:first").text();
            console.log(enterpriseid);
            if(confirm("确定删除"+enterpriseid+"吗？")){
            }else{
                //alert(enterpriseid);
                return false;
            }
        });
    });
</script>
</html>
